package vmi.surgis;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

public class MainMenuActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ((Button)findViewById(R.id.btnStudy)).setOnClickListener(new OnClickListener() {
        	public void onClick(View v) {
        		Intent i = new Intent(v.getContext(), SURGISActivity.class);
        		i.putExtra("mode", 0);
        		startActivity(i);
        	}
        });
        
        ((Button)findViewById(R.id.btnEat)).setOnClickListener(new OnClickListener() {
        	public void onClick(View v) {
        		Intent i = new Intent(v.getContext(), SURGISActivity.class);
        		i.putExtra("mode", 1);
        		startActivity(i);
        	}
        });        
	}
	@Override
	public void onDestroy()
	{
		super.onDestroy();
		((ImageView)findViewById(R.id.imgMapMain)).setImageDrawable(null);
		System.gc();
	}
}
